package com.server.action;

import com.server.core.anno.Controller;
import com.server.core.anno.HttpFilter;
import com.server.core.anno.RequestMapping;
import com.server.core.action.AbstractAction;
import com.server.core.domain.Request;
import com.server.core.domain.Response;
import com.server.core.domain.Result;
import com.server.core.enums.HttpMethod;
import com.server.core.filter.impl.DefaultFilter;
import com.server.entity.Person;
import com.server.filter.TestFilter;

import java.util.ArrayList;

@Controller
@HttpFilter(filter = DefaultFilter.class)
@HttpFilter(filter = TestFilter.class)
public class ExcampleAction extends AbstractAction {

    @RequestMapping(value = "/excample", method = HttpMethod.GET)
    public Result doGet(Request request, Response response) {
        Result result = new Result();
        result.setMsg("成功");
        result.setCode(200);
        result.setData(new Person("阿里朔月", "yygqn7@163.com", "男生",  new ArrayList<Person>()));
        return result;
    }

}